{extend name="wap@style/base" /}
{block name="resources"}
<link rel="stylesheet" href="WAP_CSS/login_css/register.css">
{/block}
{block name="main"}

<div class="hui-wrap">
	<div class="hui-center-title" style="margin-top:35px;"><h1 style="border:0px;">注册成为新用户</h1></div>
	<div style="margin:20px 10px; margin-bottom:15px;" class="hui-form" id="form_register">
		{if condition="$register_config && $register_config['register_type_common'] == '1' "}
			<div class="hui-form-items">
				<div class="hui-form-items-title">账号</div>
				<input type="text" class="hui-input hui-input-clear" id="username" name="username" placeholder="请输入账号" checkType="string" />
			</div>
		{/if}
		{if condition="$register_config && $register_config['register_type_common'] == '1' "}
			<div class="hui-form-items">
				<div class="hui-form-items-title">手机号</div>
				<input type="text" class="hui-input hui-input-clear" id="mobile" name="mobile" placeholder="请输入手机号" checkType="string" checkData=",11"/>
			</div>
			{if $register_config['mobile_code'] == 1}
			<div class="hui-form-items">
				<div class="hui-form-items-title">验证码</div>
				<input type="text" class="hui-input hui-input-clear" id="sms_code" name="sms_code" placeholder="短信验证码" checkType="string" />
				<div style="width:160px;">
					<button class="send-code" onclick="sendSmsCode(this)"  width="100%">获取动态码</button>
				</div>
			</div>
			{/if}
		{/if}

		{if condition="$register_config && $register_config['register_type_email'] == '1' "}
		<div class="hui-form-items">
			<div class="hui-form-items-title">邮箱</div>
			<input type="text" class="hui-input hui-input-clear" id="email" name="email" placeholder="请输入邮箱" checkType="string" checkData=",11"/>
		</div>
		{if $register_config['email_code'] == 1}
			<div class="hui-form-items">
				<div class="hui-form-items-title">验证码</div>
				<input type="text" class="hui-input hui-input-clear" id="email_code" name="email_code" placeholder="邮箱验证码" checkType="string" />
				<div style="width:160px;">
					<button class="send-code" onclick="sendEmailCode(this)"  width="100%">获取动态码</button>
				</div>
			</div>
		{/if}
		{/if}

		<div class="hui-form-items">
			<div class="hui-form-items-title">登录密码</div>
			<input type="password" class="hui-input hui-pwd-eye" id="password" name="password" placeholder="登录密码"   />
		</div>
		<div class="hui-form-items">
			<div class="hui-form-items-title">确认密码</div>
			<input type="password" class="hui-input hui-pwd-eye" id="cfpassword" name="cfpassword"placeholder="确认密码"   />
		</div>
		{if condition="$register_config && $register_config['web_code'] == '1' "}
			<div class="hui-form-items">
				<div class="hui-form-items-title">验证码</div>
				<input type="number" class="hui-input" id="captcha" name="captcha" value=""/>
				<div style="width:160px;">
					<img src="{:url("wap/login/captcha")}" onclick="this.src='{:url("wap/login/captcha")}'" alt="captcha" width="100%" />
				</div>
			</div>
		{/if}
	</div>

	<div style="text-align:center;">
		{php}
		$info = api("System.Manage.agreement",[]);
		{/php}
		<span ><input type="checkbox" name="agreement" value="0"></span>
		<span>我已阅读并同意</span>
		{if !empty($info['data'])}
		<a  style="color:#3280fc;" href="{:url("wap/login/agreement")}">《注册协议》</a>
		{else /}
		<a  style="color:#3280fc;" href="javascript:void(0)">《注册协议》</a>
		{/if}
	</div>
	<div style="padding:10px; padding-top:10px;">
		<button type="button" class="hui-button hui-button-large hui-primary" id="submit">立即注册</button>
	</div>
</div>

{notempty name="$register_config"}
<input type="hidden" id="hidden_random_name_prefix" value="{$register_config['random_name_prefix']}">
<input type="hidden" id="hidden_name_keyword" value="{$register_config['name_keyword']}">
<input type="hidden" id="hidden_pwd_length" value="{$register_config['pwd_length']}">
{/notempty}
{/block}
{block name="script"}
<script type="text/javascript" src="__STATIC__/ext/hui/js/hui-form.js"></script>
<script>
var cookie_name = "access_token_{$site_info['site_id']}";
var tag = "{$tag}";
{notempty name="$data"}
var data = {$data};
{else/}
var data = null;
{/notempty}
</script>
<script src="WAP_JS/login_js/register.js"></script>
{/block}